function Logger(value, context) {
    console.log('logger value:',value)
    console.log('logger context:',context)
    const { kind, name, static: Static, private: Private } = context;
    console.log(Static, Private);

    // 如果kind是 getter 是访问器装饰器
    if (kind === "method" || kind === 'getter' || kind === 'setter') {
        return function (...args) {
            console.log(`starting ${name} with arguments: ${args.join(",")}`);
            const resuslt = value.call(this, ...args);
            console.log(`ending ${name}`);
            return resuslt;
        };
    }
}
class myClass {
    @Logger
    set x(args){
        
    }
    @Logger
    get x(){
        return 2
    }
}

let clazz = new myClass();
clazz.x = 123;
console.log(clazz.x)